﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace Twi.COMMON.WPF
{
    public static class TextBoxExtensions
    {
        public static bool ValidateRequirement(this TextBox me, string errorMessage) 
        {
            if (me.Text.Trim().Length == 0) 
            {
                Tools.GMessageInfo(errorMessage);
                me.Focus();
                return false;
            }
            return true;
        }
    }
}
